<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>

selection_test(
  '<div contenteditable dir="ltr">|\u0627\u0628\u0629\u0661\u0662\u0663</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">|\u0627\u0628\u0629\u0661\u0662\u0663</div>',
  '10-0 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">\u0627|\u0628\u0629\u0661\u0662\u0663</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">|\u0627\u0628\u0629\u0661\u0662\u0663</div>',
  '10-1 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">\u0627\u0628|\u0629\u0661\u0662\u0663</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">\u0627|\u0628\u0629\u0661\u0662\u0663</div>',
  '10-2 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">\u0627\u0628\u0629|\u0661\u0662\u0663</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">\u0627\u0628|\u0629\u0661\u0662\u0663</div>',
  '10-3 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">\u0627\u0628\u0629\u0661|\u0662\u0663</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">\u0627\u0628\u0629|\u0661\u0662\u0663</div>',
  '10-4 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">\u0627\u0628\u0629\u0661\u0662|\u0663</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">\u0627\u0628\u0629\u0661|\u0662\u0663</div>',
  '10-5 ltr left character');

selection_test(
  '<div contenteditable dir="ltr">\u0627\u0628\u0629\u0661\u0662\u0663|</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr">\u0627\u0628\u0629\u0661\u0662|\u0663</div>',
  '10-6 ltr left character');
</script>
